/**
 * Description:一些注释<br/>
 * CreateTime:2019-04-12<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
package cn.cnsy123.bookwebsiteserver.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Description:数据库信息配置<br/>
 * CreateTime:2019-04-12<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
@Entity
@Table(name = "SYS_DB_INFO")
public class SysDataBaseInfo implements Serializable {

    /**
     * Description:一些注释<br/>
     * CreateTime:2019-04-12<br/>
     * Creater: yangpengfei360@126.com <br/>
     * @author yangpengfei
     */
    private static final long serialVersionUID = -4323146012757327136L;
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "DB_INFO_ID")
    private Long dbInfoId;
    
    @Column(name = "DB_NAME",length = 20)
    private String dbName;
    
    @Column(name = "DB_TYPE")
    private String dbType;
    
    @Column(name = "DB_ACCESS_IP")
    private String dbAccessIp;
    
    @Column(name = "DB_PORT")
    private Integer port;
    
    @Column(name = "DB_PASS")
    private String passWord;

    public Long getDbInfoId() {
        return dbInfoId;
    }

    public void setDbInfoId(Long dbInfoId) {
        this.dbInfoId = dbInfoId;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public String getDbAccessIp() {
        return dbAccessIp;
    }

    public void setDbAccessIp(String dbAccessIp) {
        this.dbAccessIp = dbAccessIp;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public SysDataBaseInfo() {
        
    }

    public SysDataBaseInfo(Long dbInfoId, String dbName, String dbType, String dbAccessIp, Integer port,
            String passWord) {
        this.dbInfoId = dbInfoId;
        this.dbName = dbName;
        this.dbType = dbType;
        this.dbAccessIp = dbAccessIp;
        this.port = port;
        this.passWord = passWord;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("{\"dbInfoId\":");
        builder.append(dbInfoId);
        builder.append(", \"dbName\":");
        builder.append(dbName);
        builder.append(", \"dbType\":");
        builder.append(dbType);
        builder.append(", \"dbAccessIp\":");
        builder.append(dbAccessIp);
        builder.append(", \"port\":");
        builder.append(port);
        builder.append(", \"passWord\":");
        builder.append(passWord);
        builder.append("}");
        return builder.toString();
    }
    
}
